<template>
  <div>
    <div class="footer_wrap">
      <p @click="btn('/find')">关注明星</p>
      <p @click="btn('/my')">发现精彩</p>
      <p @click="One('狂妄小比')">寻找伙伴</p>
      <p @click="Two('我嫩爹')">寻找伙伴</p>
    </div>
    <div class="top">
      <router-view></router-view>
    </div>
  </div>
</template>

<script>
export default {
  methods:{
    btn(name){
      this.$router.push({
        name
      })
    },
    One(username){

      this.$router.push({
        name:"/part",
        params:{
          username
        }
      }).catch((e)=>{
        console.log(e)
      })
    },
    Two(name){
      this.$router.push({
        name:"/part",
        query:{
          name
        }
      }).catch((e)=>{
        console.log(e)
      })
    }
  }
};
</script>

<style scoped>
.footer_wrap .router-link-active{
  color: white;
  background: black;
}

.footer_wrap {
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  width: 100%;
  text-align: center;
  background-color: #333;
  color: #ccc;
}
.footer_wrap p {
  flex: 1;
  text-decoration: none;
  padding: 15px 0;
  line-height: 20px;
  background-color: #333;
  color: #ccc;
  border: 1px solid black;
}
.footer_wrap p:hover {
  background-color: #555;
}
.top {
  padding-top: 62px;
}
</style>